package com.shg.service;

import java.util.List;
import java.util.Map;

import com.shg.bean.Ad;
import com.shg.bean.PageView;
import com.shg.bean.QueryResult;

public interface AdService extends BasiceDao<Ad> {
 
	/**
	 * 分页查询用户申请上来的图书
	 * @param pageView
	 * @return
	 */
	public QueryResult<Ad> getAdList(PageView<Ad> pageView)throws Exception;
	/**
	 * 查询的总记录数
	 * @param count
	 * @return
	 */
	public Map<String, Object> getAdList() throws Exception;

	/**
	 * 查询广告书籍
	 * @param bookid
	 * @return
	 */
	public Ad getApply(String bookid)throws Exception;
	/**
	 * 保存广告
	 * @param ads广告对象数组
	 */
	public void addShuhgAd(Ad ads)throws Exception;
	/**
	 * 查询店铺的广告申请
	 * @param pageView
	 * @return
	 * @throws Exception
	 */
	public QueryResult<Ad> getShopAd(PageView<Ad> pageView)throws Exception;
	/**
	 * 审核广告申请
	 * @param adids 
	 * @param type
	 */
	public void updateFlag(String[] adids, Integer type)throws Exception;
	/**
	 * 查询本店店铺的广告
	 * @param shop
	 * @return
	 * @throws Exception
	 */
	public List<Ad> getShopAd(String shop)throws Exception;
	/**
	 * 更新广告为店铺广告
	 * @param id
	 */
	public void addShopAd(Ad ad)throws Exception;
	/**
	 * 专门查询店铺的广告
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public List<Ad> getShop(String id,Integer size)throws Exception;
	/**
	 * 取消广告
	 * @param ad
	 * @return
	 * @throws Exception
	 */
	public List<Ad> updateType(Ad ad)throws Exception;
	
}
